package model.trajectory;

import model.BaseModel;
import colors.Color;

public class TargetModel extends BaseModel{

	public static int nbTarget = 0;
	public String name;
	private Color color;
	
	private boolean isVisible = false;
	
	public TrajectoryModel traj;

	
	public TargetModel(int ID, String name)
	{
		super(ID);
		this.name = name;
		this.setColor(new Color(0.0f, 0.0f, 0.0f));
	}	
	
	@Override
	public String toString()
	{
		return name;
	}
	
	public String saveToText()
	{
		return this.traj.saveToText();
	}

	public void setTrajectory(TrajectoryModel traj) 
	{
		this.traj = traj;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}
	
	@Override
	public void setHighlighted(boolean value)
	{
		this.traj.setHighlighted(value);
	}

	public boolean isVisible() {
		return isVisible;
	}

	public void setVisible(boolean isVisible) {
		this.isVisible = isVisible;
		this.traj.setVisible(isVisible);
	}		
}
